package com.longxi.tianjintianbao.api;

import com.longxi.tianjintianbao.api.response.BaseResponse;
import com.longxi.tianjintianbao.api.response.BaseResponseWebPd;
import com.longxi.tianjintianbao.api.response.HttpResult;
import com.longxi.tianjintianbao.greedao.entity.Patrol;
import com.longxi.tianjintianbao.greedao.entity.User;
import com.longxi.tianjintianbao.model.Build;
import com.longxi.tianjintianbao.model.ChangeFormal;
import com.longxi.tianjintianbao.model.CopeWith;
import com.longxi.tianjintianbao.model.Cost;
import com.longxi.tianjintianbao.model.GoodsTraffic;
import com.longxi.tianjintianbao.model.OAAuditing;
import com.longxi.tianjintianbao.model.OAPersonnel;
import com.longxi.tianjintianbao.model.Personnel;
import com.longxi.tianjintianbao.model.ReceiptList;
import com.longxi.tianjintianbao.model.RepairDetail;
import com.longxi.tianjintianbao.model.RepairList;
import com.longxi.tianjintianbao.model.RepairType;
import com.longxi.tianjintianbao.model.approval.Approval;
import com.longxi.tianjintianbao.model.approval.ApprovalContent;
import com.longxi.tianjintianbao.model.approval.ApprovalNextNode;
import com.longxi.tianjintianbao.model.assetrepair.AssetRepair;
import com.longxi.tianjintianbao.model.complaint.Complaint;
import com.longxi.tianjintianbao.model.complaint.ComplaintFollow;
import com.longxi.tianjintianbao.model.contact.ContactDepartment;
import com.longxi.tianjintianbao.model.equipment.AssetsDetail;
import com.longxi.tianjintianbao.model.equipment.Equipment;
import com.longxi.tianjintianbao.model.equipment.EquipmentInspection;
import com.longxi.tianjintianbao.model.equipment.EquipmentListDetails;
import com.longxi.tianjintianbao.model.equipment.EquipmentMaintain;
import com.longxi.tianjintianbao.model.equipment.EquipmentRepair;
import com.longxi.tianjintianbao.model.houseinspection.HouseCompensate;
import com.longxi.tianjintianbao.model.houseinspection.YanFang;
import com.longxi.tianjintianbao.model.maintain.AssetsMaintain;
import com.longxi.tianjintianbao.model.maintain.Maintain;
import com.longxi.tianjintianbao.model.message.MessageCount;
import com.longxi.tianjintianbao.model.message.MessageList;
import com.longxi.tianjintianbao.model.message.MessageListCount;
import com.longxi.tianjintianbao.model.meter.Meter;
import com.longxi.tianjintianbao.model.patrol.PatrolContent;
import com.longxi.tianjintianbao.model.quality.Quality;
import com.longxi.tianjintianbao.model.quality.QualityClass;
import com.longxi.tianjintianbao.model.quality.QualityItem;
import com.longxi.tianjintianbao.model.rectification.RectificationItem;
import com.longxi.tianjintianbao.model.rectification.RectificationList;
import com.longxi.tianjintianbao.model.repair.RepairAssets;
import com.longxi.tianjintianbao.model.task.Task;
import com.longxi.tianjintianbao.model.task.TaskProgress;
import com.longxi.tianjintianbao.model.visitor.CertificateType;
import com.longxi.tianjintianbao.model.visitor.Visitor;
import com.longxi.tianjintianbao.model.work.News;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by kuma on 2018/4/12.
 */

public interface MyApi {
    String[] IPs = {"http://122.112.213.120:9126/wyy_lywy/api/Interface/",
            "http://122.112.248.82:9126/wyy_ykmwy/api/Interface/",
            "http://122.225.106.235:9000/jgj/api/Interface/",
            "http://192.168.66.66:9127/api/Interface/",};

    String[] BMs = {"领域物业",
            "凯迈物业",
            "龙禧测试",
            "本地测试"};

    public static String IP =  "192.168.66.66:9127";
    public static final String BASE_URL = "http://"+ IP + "/api/Interface/";
    //公司用地址
//    public static String IP =  "122.225.106.235:9000";
//    public static final String BASE_URL = "http://"+ IP + "/jgj/api/Interface/";

    //领域
//    public static String IP =  "122.112.213.120:9126";
//    public static final String BASE_URL = "http://"+ IP + "/wyy_lywy/api/Interface/";
    //凯迈
//    public static String IP =  "122.112.248.82:9126";
//    public static final String BASE_URL = "http://"+ IP + "/wyy_ykmwy/api/Interface/";

    //登录
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<User>> login(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取区域分类
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<RepairType>> getRegionType(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //获取员工所在管理处/分公司小区
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Build>> getUserBuild(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //获取房产信息
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Build>> getBuilds(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //员工所属小区保存
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveUserBuild(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //报事报修保存
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveEventRepair(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //报事报修列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<RepairList>> getEventRepairList2(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //获取报事报修信息
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<RepairDetail>> getEventRepair(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //获取人员列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Personnel>> getPersonnel(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //报事报修派单
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> dispatchEventRepair(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //报事报修接单
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> acceptEventRepair(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //获取资产信息
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<RepairAssets>> getRepairAssets(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //报事报修开始维修
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> startEventRepair(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //报事报修开始维修
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> suspendEventRepair(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //报事报修暂停（开始）
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> completeEventRepair(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //报事报修暂停（开始）
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<ReceiptList>> getOAList(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //OA费用申请单
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveCostApply(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //获取OA费用申请单
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Cost>> getCostApply(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //OA审批流程
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<OAAuditing>> getOAAuditing(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //OA审批人员
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<OAPersonnel>> getOAPersonnel(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //OA应付款项申请单
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveCopeWith(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //获取OA应付款项申请单
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<CopeWith>> getCopeWith(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //OA转正申请单
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveChangeFormal(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //获取OA转正申请单
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<ChangeFormal>> getChangeFormal(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //OA审批
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveOAAuditing(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //品质检查列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Quality>> getQualityList(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //品质检查类
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<QualityClass>> getQualityClass(@Field("method") String method, @Field("data") String data,@Field("sign") String sign);

    //品质检查项
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<QualityItem>> getQualityItem(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //品质检查打分
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveQualityScore(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //品质检查开始（结束）
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveQualityState(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //品质检查打分
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<RectificationList>> getRectificationList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //品质检查打分
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<RectificationList>> getRectificationList2(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //品质整改项目
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<RectificationItem>> getRectificationItem(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //品质整改开始（结束）
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveRectificationState(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //品质整改保存
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveRectification(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //品质整改详情
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<RectificationList>> getRectification(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //添加任务
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveTask(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //任务列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Task>> getTaskList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //任务详情
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Task>> getTask(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //任务接单
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> acceptTask(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //添加任务进度
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> addTaskProgress(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取任务进度
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<TaskProgress>> getTaskProgress(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取投诉列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Complaint>> getComplaintList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取投诉详情
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Complaint>> getComplaintDetail(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //投诉处理
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveComplaint(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //投诉跟进记录
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<ComplaintFollow>> getComplaintFollow(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取投诉列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Visitor>> getVisitorList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //访客登记
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveVisitor(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取投诉列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<CertificateType>> getCertificatetype(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //访客离开登记
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveVisitorLeave(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //物品放行列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<GoodsTraffic>> getGoodsReleaseList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //添加物品放行
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveGoodsRelease(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //物品放行离开登记
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveGoodsLeave(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //物品放行详情
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<GoodsTraffic>> getGoodsRelease(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //巡检列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Patrol>> getInspectionList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //巡检列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<com.longxi.tianjintianbao.model.patrol.Patrol>> getInspectionList2(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //巡检明细
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<PatrolContent>> getInspectionDetail(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //巡检结果上传
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveInspection(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Equipment>> getAssetsList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //设备列表详情
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<EquipmentListDetails>> getEquipmentListDetails(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //设备巡检记录
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<EquipmentInspection>> getEquipmentInspection(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //设备保养记录
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<EquipmentMaintain>> getEquipmentMaintain(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //设备维修记录
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<EquipmentRepair>> getEquipmentRepair(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //设备保养列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Maintain>> getEquipmentMaintainList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //设备保养保存
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveEquipmentMaintain(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //水电表列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Meter>> getMetersList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //水电表度数保存
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveMeterDegrees(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //联系人列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<ContactDepartment>> getContactsList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产详情
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<AssetsDetail>> getAssetsDetail(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取信息个数
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<MessageCount>> getMessageCount(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取未读任务消息数量
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<MessageListCount>> getMessageListCount(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取任务消息列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<MessageList>> getMessageList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //获取任务消息列表
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> saveMessageLookOver(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //任务列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<News>> newsBulletin(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //任务列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<Approval>> myApproval(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //任务列表
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<ApprovalContent>> myApprovalDetail(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //任务列表
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> myApprovalSave(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //下一流程步骤
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<ApprovalNextNode>> myApprovalNextNode(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //下一流程步骤
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponseWebPd> validate(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产维修
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<AssetRepair>> getAssetsRepair(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产维修
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<AssetsMaintain>> getAssetsMaintain(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产维修
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<YanFang>> getCheckInList(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产维修
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<YanFang>> getCheckIn(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产维修
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> checkInSave(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产维修
    @FormUrlEncoded
    @POST("Server")
    Observable<HttpResult<HouseCompensate>> getCompensate(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);

    //资产维修
    @FormUrlEncoded
    @POST("Server")
    Observable<BaseResponse> compensateSave(@Field("method") String method, @Field("data") String data, @Field("sign") String sign);
}
